//
// Decompiled by Jadx - 434ms
//
package fn;

import android.app.Activity;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import de.robv.android.xposed.XC_MethodHook;
import fo.a;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import me.plusne.HookMain;
import p.e;

public final class q extends XC_MethodHook {
    public final x a;

    public q(HookMain.b bVar) {
        this.a = bVar;
    }

    public final void afterHookedMethod(XC_MethodHook.MethodHookParam methodHookParam) throws Throwable {
        super.afterHookedMethod(methodHookParam);
        if (!x.bq) {
            x.bq = true;
            this.a.getClass();
            SensorEventListener tVar = new t();
            SensorManager sensorManager = (SensorManager) y.by.getActivity().getSystemService("sensor");
            sensorManager.registerListener(tVar, sensorManager.getDefaultSensor(1), 3);
            b.m(0, "queryHookDataTime");
            e.b((e.b) null, true);
            Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(new a(), 1L, 1L, TimeUnit.SECONDS);
        }
    }

    public final void beforeHookedMethod(XC_MethodHook.MethodHookParam methodHookParam) throws Throwable {
        super.beforeHookedMethod(methodHookParam);
        Activity activity = (Activity) methodHookParam.thisObject;
        y.by.setActivity(activity);
        j.z(activity);
    }
}
